package com.deng.factory;

import org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration;

public class SF {

//	private static Configuration cf = new Configuration();
	private static Configuration cf = new Configuration().configure();	
	
	public static SessionFactory getSF()
	{
		try
		{
//			cf.configure();
//			System.out.println("2>>>>>>"+cf+"<<<<<<");
//			System.out.println("3>>>>>>"+cf.getProperty("hibernate.connection.provider_class")+"<<<<<<");
//			System.out.println("4>>>>>>"+cf.getProperty("hibernate.connection.driver_class")+"<<<<<<");
//			System.out.println("5>>>>>>"+cf.getProperty("hibernate.connection.url")+"<<<<<<");
		}
		catch(Exception ex)
		{
			ex.printStackTrace();
		}		
		return cf.buildSessionFactory();
	}
}
